package cn.rkylin.oms.warehouse.local.returnStockin.vo;

import java.math.BigDecimal;

import cn.rkylin.oms.warehouse.local.returnStockin.domain.ReturnStockinSku;

/**
 * 退货入库单商品VO
 * 
 * @author 齐涛
 * @version 1.0
 * @created 11-9-2017 10:51:30
 */
public class ReturnStockinSkuVO extends ReturnStockinSku {

    // 实际金额
    private BigDecimal factUnitAmount;

    // 实际支付金额
    private BigDecimal divideGoodsAmount;

    // 异常标识图标
    private static final String ABNORMAL_FLAG = "<span class='badge badge-red'> </span>";

    // 异常标识
    private String identification;

    // 排序
    private String orderBy;

    public BigDecimal getFactUnitAmount() {
        return (this.getFactUnitPrice().multiply(new BigDecimal(this.getQty())));
    }

    public void setFactUnitAmount(BigDecimal factUnitAmount) {
        this.factUnitAmount = factUnitAmount;
    }

    public BigDecimal getDivideGoodsAmount() {
        return (this.getDivideGoodsFee().multiply(new BigDecimal(this.getQty())));
    }

    public void setDivideGoodsAmount(BigDecimal divideGoodsAmount) {
        this.divideGoodsAmount = divideGoodsAmount;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getIdentification() {
        if ("y".equals(this.getIsExcept())) {
            identification = ABNORMAL_FLAG;
        } else {
            identification = "";
        }
        return identification;
    }

    public void setIdentification(String identification) {
        this.identification = identification;
    }

}
